﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TreeFrame.aspx.cs" Inherits="TreeFrame" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script language="javascript" src="../Scripts/jquery.js" type="text/javascript"> </script>                     
    <script language="javascript" src="../Scripts/Tools.js" type="text/javascript"> </script>                
    <link href="../Style/OutdoorAgency.css" rel="stylesheet" type="text/css" />         
    <script language ="javascript" type ="text/javascript" >
        
        var minWidth = 243;
        var defWidth = 243;
        var splitterWidth = 4;
        var sCookeName = 'NavWidth';
        var winWidth;
        function SetSize() {
            if (GetTocPanelCookie(sCookeName) != defWidth) 
            {
                defWidth = GetTocPanelCookie(sCookeName);
            }
            if (minWidth > defWidth) defWidth = minWidth;
            
            
            Resize();
        }

        function Resize() {            
        
        var h = parseInt($(window).height());
        $("#panelContent").height(h);
        $("#tocPanel").height(h);
        $("#resizeSplitter").height(h);

        document.getElementById("resizeSplitter").style.left = defWidth + "px";        
        document.getElementById("panelContent").style.left = splitterWidth + defWidth + "px";
        

        winWidth = parseInt(document.body.clientWidth);
        $("#tocPanel").width(defWidth);
        $("#resizeSplitter").width(splitterWidth);
        $("#panelContent").width(winWidth - defWidth - splitterWidth);
    }

    function Toggle() {        
        if ($("#tocPanel").width() == 1)
            defWidth = minWidth;
        else
            defWidth = 1;            
        Resize();
    }

</script>
</head>
<body onload="document.body.onresize=Resize(); window.onresize=Resize();">
    <form id="form1" runat="server">
    <div>
      <div id="tocPanel" class="tocPanel">        
                <iframe id="TreeFrame" src =<%# RedirectUrl %> width="100%" 
                    scrolling="auto"  height="100%" frameborder ="0" >        
                </iframe>                            
        </div>
        <div id ="resizeSplitter" class="resizeSplitter" 
        onclick ="Toggle();" 
        >
            
        </div>
        <div id="panelContent" class="contentPanel" >                
           <iframe id="BranchContent" width="100%" scrolling="auto"  height="100%" frameborder ="0" >        
           </iframe>                                     
        </div>
    </div>
    </form>
</body>
</html>
